package com.sayyi.demo.bean.copy.mapstruct;

import com.sayyi.demo.bean.ParentDemo;
import com.sayyi.demo.bean.domain.Dest;
import com.sayyi.demo.bean.domain.Source;
import com.sayyi.demo.bean.domain.SourceWrapper;

/**
 * @author xuchuang
 * date 2021/12/29 10:46 AM
 */
public class MapstructDemo {

    public static void main(String[] args) {
        Source source = ParentDemo.genSource();
        final Dest dest = SourceMapper.INSTANCE.sourceToDest(source);
        System.out.println(dest);

        final SourceWrapper sourceWrapper = ParentDemo.genSourceWrapper();
        System.out.println(SourceWrapperMapper.INSTANCE.sourceWrapperToDestWrapper(sourceWrapper));
    }
}
